<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	
<ui:decorate template="/templates/template.xhtml">

</ui:decorate>
		<h:form id="cadastro">
			<p:fieldset legend="Mega Sena" toggleable="true" toggleSpeed="500" rendered="#{indexAction.sizeMegaSena > 0}" >
				<p:dataTable id="tbl_sena" var="megaSena" value="#{indexAction.megaSena}"
					paginatorPosition="bottom"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
					paginator="true" rows="5" style="margin-bottom:20px">
					<p:column headerText="Grupo">
						<h:link>
							<h:outputText value="Criar grupo"></h:outputText>
						</h:link>
					</p:column>
					<p:column headerText="Data Sorteio">
						<h:outputText value="#{megaSena.dtSorteio}">
							<f:convertDateTime pattern="dd/MM/yyyy"></f:convertDateTime>
						</h:outputText>
					</p:column>
					<p:column headerText="Total de Cotas">
						<h:outputText value="#{megaSena.qtdCotas}" />
					</p:column>
					<p:column headerText="Cotas disponiveis">
						<h:outputText value="#{megaSena.qtdCotas}" />
					</p:column>
					<p:column headerText="Valor da Cota">
							R$<h:outputText value="#{megaSena.valorCota}" />
					</p:column>
					<p:column headerText="Comprovante">
						<p:commandButton id="btn_jogos_megaSena" type="button" styleClass="ui-icon ui-icon-search" />
							<p:overlayPanel id="ovr_jogos_megaSena" for="btn_jogos_megaSena" hideEffect="fade" dynamic="true" style="width:600px" >
								<p:dataTable id="tbl_jogos_megaSena" var="jogo" value="#{megaSena.jogos}" rows="10" paginator="true" paginatorPosition="bottom" >
									<p:column headerText="jogo" >
										<h:outputText value="#{jogo}" />
									</p:column>
								</p:dataTable>
							</p:overlayPanel>
					</p:column>
					<p:column headerText="Comprar Cotas">
        					<p:selectOneMenu id="console"  >
            					<f:selectItem itemLabel="1" itemValue="1" />
            					<f:selectItem itemLabel="2" itemValue="2" />
            					<f:selectItem itemLabel="3" itemValue="3" />
            					<f:selectItem itemLabel="4" itemValue="4" />
        					</p:selectOneMenu>
					</p:column>
					<p:column headerText="Comprar">
						<p:commandButton id="btn_jogos_megaSena_comprar" type="button" styleClass="ui-icon ui-icon-cart" />
					</p:column>
				</p:dataTable>
			</p:fieldset>
			<p:fieldset legend="Quina" toggleable="true" toggleSpeed="500" rendered="#{indexAction.sizeQuina > 0}">
				<p:dataTable id="tbl_quina" var="quina" value="#{indexAction.quina}"
					paginatorPosition="bottom"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
					paginator="true" rows="5" style="margin-bottom:20px">
					<p:column headerText="Grupo">
						<h:link>
							<h:outputText value="Criar grupo"></h:outputText>
						</h:link>
					</p:column>
					<p:column headerText="Nº Fixo">
						<h:outputText value="#{quina.seqObrigatoria}"></h:outputText>
					</p:column>
					<p:column headerText="Nº Excluido">
						<h:outputText value="#{quina.seqIngnorada}"></h:outputText>
					</p:column>
					<p:column headerText="Data Sorteio">
						<h:outputText value="#{quina.dtSorteio}">
							<f:convertDateTime pattern="dd/MM/yyyy"></f:convertDateTime>
						</h:outputText>
					</p:column>
					<p:column headerText="QTD de jogos">
						<h:outputText value="#{quina.qtdJogos}" />
					</p:column>
					<p:column headerText="QTD de Cotas">
						<h:outputText value="#{quina.qtdCotas}" />
					</p:column>
					<p:column headerText="Valor da Cota">
							R$<h:outputText value="#{quina.valorCota}" />
					</p:column>
					<p:column headerText="Comprovante">
						<p:commandButton id="btn_jogos_quina" type="button" styleClass="ui-icon ui-icon-search" />
						<p:overlayPanel id="ovr_jogos_megaSena" for="btn_jogos_quina" hideEffect="fade" dynamic="true" style="width:600px" >
							<p:dataTable id="tbl_jogos_quina" var="jogo" value="#{quina.jogos}" rows="10" paginator="true" paginatorPosition="bottom" >
								<p:column headerText="jogo" >
									<h:outputText value="#{jogo}" />
								</p:column>
							</p:dataTable>
						</p:overlayPanel>
					</p:column>
				</p:dataTable>
			</p:fieldset>
			<p:fieldset legend="Dupla Sena" toggleable="true" toggleSpeed="500" rendered="#{indexAction.sizeDuplaSena > 0}" >
				<p:dataTable id="tbl_duplaSena" var="duplaSena" value="#{indexAction.duplaSena}"
					paginatorPosition="bottom"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
					paginator="true" rows="5" style="margin-bottom:20px">
					<p:column headerText="Grupo">
						<h:link>
							<h:outputText value="Criar grupo"></h:outputText>
						</h:link>
					</p:column>
					<p:column headerText="Nº Fixo">
						<h:outputText value="#{duplaSena.seqObrigatoria}"></h:outputText>
					</p:column>
					<p:column headerText="Nº Excluido">
						<h:outputText value="#{duplaSena.seqIngnorada}"></h:outputText>
					</p:column>
					<p:column headerText="Data Sorteio">
						<h:outputText value="#{duplaSena.dtSorteio}">
							<f:convertDateTime pattern="dd/MM/yyyy"></f:convertDateTime>
						</h:outputText>
					</p:column>
					<p:column headerText="QTD de jogos">
						<h:outputText value="#{duplaSena.qtdJogos}" />
					</p:column>
					<p:column headerText="QTD de Cotas">
						<h:outputText value="#{duplaSena.qtdCotas}" />
					</p:column>
					<p:column headerText="Valor da Cota">
							R$<h:outputText value="#{duplaSena.valorCota}" />
					</p:column>
					<p:column headerText="Comprovante">
						<p:commandButton id="btn_jogos_duplaSena" type="button" styleClass="ui-icon ui-icon-search" />
						<p:overlayPanel id="ovr_jogos_duplaSena" for="btn_jogos_duplaSena" hideEffect="fade" dynamic="true" style="width:600px" >
							<p:dataTable id="tbl_jogos_duplaSena" var="jogo" value="#{duplaSena.jogos}" rows="10" paginator="true" >
								<p:column headerText="jogo" >
									<h:outputText value="#{jogo}" />
								</p:column>
							</p:dataTable>
						</p:overlayPanel>
					</p:column>
				</p:dataTable>
			</p:fieldset>
		</h:form>

</html>
